package Xiancheng;

import java.util.Date;

/**
 * 时间的测试类
 * @author AcerMr
 *
 */
public class DateMain
{
	public static void main(String[] args)
	{
		System.out.println("======");
		Date now = new Date();
		System.out.println("==toString=="+now);
		System.out.println("==toLocaleString=="+ now.toLocaleString());
		long st  = System.currentTimeMillis() - 1000000;
		Date now1 = new Date(st);
		System.out.println(now1+"==toLocaleString=="+ now1.toLocaleString());
		System.out.println("==after=="+now.after(now1));
		System.out.println("==before==" + now.before(now1) );
		System.out.println("==conpareTo==" + now.compareTo(now1) );
		System.out.println("==getTime=="+now1.getTime());
		System.out.println("==geTime=="+now.getTime());
		long max = Long.MAX_VALUE; 
		System.out.println("=MAX_VALUE="+ max);
		Date nowMax = new Date(max);
		System.out.println(nowMax.toLocaleString());
		
	}
}
